/*
 * @author (C) <a href="http://www.carfield.com.hk">Carfield Yim </a>, 2004
 */
package hk.com.carfield.content;

import hk.com.carfield.core.Config;
import hk.com.carfield.util.UrlUtil;
import java.io.File;
import java.io.UnsupportedEncodingException;

public abstract class PluginItem implements Content {
	private final Config config;
	private final File file;
	static final String eol = "\n";

	public PluginItem(final Config config, final File file) {
		super();
		this.config = config;
		this.file = file;
	}

	public final String getContent() throws UnsupportedEncodingException {
		//TODO involve jmf media player applet later
		final String path = UrlUtil.getUrl(config, file);
		return pluginHtml(path);
	}
	public abstract String pluginHtml(final String path);

	public String getThumbnail() {
		//TODO add default icon for difference type... should get through servlet so that one jar is ok
		return null;
	}
}